
// EventNotifyView.h : interface of the CEventNotifyView class
//

#pragma once

#include "resource.h"
#include "afxcmn.h"
#include "afxwin.h"
#include "EventPropDlg.h"
#include "SoundsDlg.h"
#include "NotifyDlg.h"
#include "StoperDlg.h"


class CEventNotifyView : public CFormView
{
protected: // create from serialization only
	CEventNotifyView();
	DECLARE_DYNCREATE(CEventNotifyView)

public:
	enum{ IDD = IDD_EVENTNOTIFY_FORM };

// Attributes
public:
	CEventNotifyDoc* GetDocument() const;

// Operations
public:

// Overrides
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct

// Implementation
public:
	virtual ~CEventNotifyView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	afx_msg void OnFilePrintPreview();
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	DECLARE_MESSAGE_MAP()
private:
	CListCtrl m_EventListCtrl;
public:
//	BOOL m_NotifyCtrl;
	int m_NotifyTypeCtrl;
	BOOL m_SoundOnOffCtrl;
	afx_msg void OnBnClickedNotify();
	afx_msg void OnBnClickedSound();
	afx_msg void OnBnClickedEventadd();
private:
	void FillList(void);
public:
	virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
	afx_msg void OnItemchangedEventlist(NMHDR *pNMHDR, LRESULT *pResult);
private:
	bool bFillingList;
public:
	afx_msg void OnBnClickedEventedit();
	afx_msg void OnEditSounds();
	afx_msg void OnBnClickedEventdelete();
private:
	NOTIFYICONDATA m_nidTrayIcon;
public:
	afx_msg void OnDestroy();
protected:
	afx_msg LRESULT OnTrayClick(WPARAM wParam, LPARAM lParam);
public:
	afx_msg void OnTimer(UINT_PTR nIDEvent);
private:
	void LaunchNotify(CEventParams* pepEvent);
	CNotifyDlg* m_pndNotifyDlg;
public:
	int m_SoundTimeout;
	afx_msg void OnEnChangeSoundTimeout();
	afx_msg void OnNarzStoper();
private:
	CStoperDlg* m_psdStoperDlg;
	HWND m_mciSound;
public:
//	afx_msg void OnNcDestroy();
};

#ifndef _DEBUG  // debug version in EventNotifyView.cpp
inline CEventNotifyDoc* CEventNotifyView::GetDocument() const
   { return reinterpret_cast<CEventNotifyDoc*>(m_pDocument); }
#endif

